package com.knowswift.security.annotation;

import com.knowswift.security.InjectConfig;
import com.knowswift.security.SecurityConfig;
import com.knowswift.security.util.RedisConfig;
import com.knowswift.security.util.RedisUtils;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

import java.lang.annotation.*;

@Documented
@Inherited
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableWebSecurity// 这个注解必须加，开启Security
@EnableGlobalMethodSecurity(prePostEnabled = true)//保证post之前的注解可以使用
@Import({InjectConfig.class, SecurityConfig.class, RedisConfig.class, RedisUtils.class})
public @interface EnableSecurityAuth {
}
